<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
 <script>
     function person(){
	   var name = "zIt1";//私有属性
	   var age = 10;
	   this.name2 = "zIt2";//公有属性
	   this.show = function(){//公有函数
	      window.alert(name);
	   }
        function show2(){//私有函数
		
		}
	 }
	 var p1 = new person();
	 var p2 = new person();
	 window.alert(p1.name);
	 window.alert(p2.name2);
	 p2.show();
 </script>
</html>
